package com.neutech.service.impl;
import com.neutech.mapper.DisposalMapper;
import com.neutech.service.DisposalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public  class DisposalServiceImpl implements DisposalService {
    @Autowired(required = false)
     DisposalMapper disposalMapper;
    @Override
    public List<Map<String, Object>> queryDisposal() {
        List<Map<String, Object>> list = disposalMapper.queryDisposalList(0);
        return list;
    }
    @Override
    public void insertDisposal(Map map){
        Integer a = disposalMapper.addDisposal(map);

    }
    @Override
    public void updataDisposal(Map map){
        disposalMapper.updataDisposalById(map);
    }
    @Override
    public void deleteDisposal(Map map){
       // disposalMapper.delDisposalById(map);
        Integer disid= Integer.valueOf(map.get("disid").toString());
        disposalMapper.delDisposalById(disid);
}
}
